home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
8bit
/
cislib_b
/
probj.doc
< prev
next >
Wrap
Text File
|
1995-04-22
|
12KB
|
433 lines
PROBJ 1.0
PRocess OBJect (Load) files.
Compiled in ACTION!(tm)
(c)1984 John Navas II
No commercial use without permission.
OVERVIEW:
PROBJ is a general purpose utility
for processing Atari DOS object Load
files. It's principal capabilities
are:
* To produce a RAM address map of
the segments in the load file,
together with the disk address of the
start of each segment.
* To produce a new load file with
contiguous segments "compressed" into
a longer segment (which can save disk
space and speed loading).
* To allow one or more segment(s)
to be deleted from the new load file.
(Thus a single load file may be broken
into pieces.)
* To ZAP (change) bytes in the new
load file. (All changes are verified,
allowing bytes to be examined even if
no changes are to be made.)
MINIMUM SYSTEM REQUIREMENTS:
* 24K RAM (48-64K is preferred).
* Disk Drive.
FEATURES:
* PROBJ is in binary Load file form
(to be run from DOS with OR WITHOUT
any cartridges). THIS MEANS THAT IT
MUST BE DOWNLOADED WITH A PROGRAM
SUPPORTING CIS ERROR-CHECKING, SUCH AS
TSCOPE.
* Dynamic buffer uses all of
available RAM (buffer size displayed).
* Extensive error trapping.
* Accepts responses in upper or
lower case.
* Interactive execution with helps
and prompts.
* RAM map may be directed to any
valid file specification.
* RAM map identifies DOS initialize
and run vectors.
* Both RAM addresses and data
displayed and accepted in hexadecimal
format.
* Disk addresses in decimal format.
* Generation of the output file is
optional.
NOTES:
* Loads in RAM at $3000 (12K).
Program size is approximately 8K
bytes.
* Should work with any compatible
DOS and disk drives.
* Will NOT accept tokenized Atari
BASIC (Saved) programs.
* Will not accept ATASCII text
files.
COMPRESSING OBJECT LOAD FILES:
All DOS object load files must
begin with a 2-byte "header" of $FFFF.
Since one load file can be Appended to
another with DOS Copy, there can be
unnecessary headers embedded in a
file. PROBJ automatically removes
embedded headers from any output file.
An object load file consists of one
or more load segments. Each segment
consists of two 2-byte addresses
giving the beginning and ending RAM
address for the segment (in 6502
low-high byte format), followed by the
data for that segment. Each time DOS
encounters the end of one segment and
the beginning of another segment, the
extra processing required results in a
delay long enough for the disk drive
to take an extra revolution. As a
result, a file containing a number of
short segments will Load much more
slowly than a file of equal length
consisting of a single segment.
The problem is that some program
development tools, most notably the
Atari Macro Assembler, generate object
files containing only short segments,
even if the segments load in
contiguous RAM addresses. PROBJ will
combine these contiguous segments into
a longer segment (buffer size
permitting), creating a new file which
should Load faster and may also save
disk space by the elimination of
unnecessary 2-byte addresses (and
headers).
GETTING STARTED:
For maximum buffer size it is
recommended that any cartridges be
removed from your machine. However,
adequate RAM should be available for
most object load files even with a
cartridge installed. (If a buffer
error message is encountered with a
cartridge installed during program
execution on a 48-64K system, remove
the cartridge and re-try the
operation!)
From your DOS menu, Load PROBJ.BIN
(unless you've given it a different
name). As soon as the program Loads,
the following screen is displayed:
***********************************
PROBJ 1.0 - Written in ACTION!(tm)
(C)1984 John Navas II
Input must be a standard DOS object
Load file. Output will be a RAM map
and an optional compressed Load file.
Individual segments may be removed
from and bytes may be "ZAP" changed
in the output Load file.
Buffer size = $hhhh
***********************************
The actual buffer size appears in
place of "hhhh". The buffer limits the
maximum size of a compressed output
object file segment (see "error
messages" below). It also limits the
maximum size of any input object file
segment which can be processed; if an
input segment is encountered which
exceeds the buffer, processing is
abandoned with an error message (see
below).
PROBJ first asks:
FILE SPEC for RAM map? (E:)
If you want your map to appear on
your screen, merely press <RETURN>.
You may direct it to your printer by
typing P<RETURN>. In fact you may type
any valid file specification (although
interactive operation can be difficult
if the map is not visible!). If the
file cannot be opened successfully,
PROBJ responds "CANNOT OPEN FILE!" and
prompts you to try again. If the file
is opened to a device other than the
screen editor (E:), a title with the
input file name will be placed before
the map.
Next PROBJ prompts you with:
Input FILE SPEC?
First, make sure that the disk
containing the input file is in your
disk drive! Then type the file
specification of the input file you
wish to process. (If your file is on
disk drive #1, you may omit the "D:".)
Again, you will get an error message
and be prompted to try again if the
file cannot be opened.
Next you will see:
Output FILE SPEC?
If you want only a RAM map, and not
an output file, merely press <RETURN>.
Otherwise, first make sure that you
have a disk in your drive with
sufficient room to accomodate the
output file! Then type the file
specification of the output file to be
created. (If your file is on disk
drive #1, you may omit the "D:".)
Again, you will get an error message
and be prompted to try again if the
file cannot be opened.
If (and only if) you are creating
an output file, PROBJ will next give
the following two prompts:
Remove output segments? (Y/N)
ZAP (change) bytes? (Y/N)
In each case, only press a key to
give your answer (do NOT press
<RETURN>). PROBJ will confirm your
choice by displaying "YES" or "NO".
Processing now begins. PROBJ first
looks for the DOS $FFFF header in the
input file and abandons processing
with an error message if one is not
found (see "error messages" below).
Any time a DOS header is
encountered, PROBJ will display:
HEADER AT SCTR 88, BYTE 99
88 and 99 will of course be
replaced with the actual disk address
(in decimal) of the first byte of the
header.
Any time a segment is encountered,
PROBJ first checks to see if the
segment is contiguous with the last
segment. If it is, PROBJ will display:
CONTIGUOUS:
Next, PROBJ will map the segment by
displaying:
SEG $hhhh-$iiii AT SCTR 88, BYTE 99
$hhhh will be replaced with the
actual beginning RAM address and $iiii
will be replaced with the actual
ending RAM address. As before, 88 and
99 will be replaced with the actual
disk address (in decimal) of the first
(low) byte of the first address.
If the segment is contiguous, PROBJ
then checks to see if it will fit in
the remaining buffer space. If it
won't, this particular segment won't
be compressed, but processing will
continue after the message:
WON'T FIT IN BUFFER, CAN'T COMPRESS
If the segment contained a DOS
initialize and/or run vector, the
vector HEXADECIMAL address will be
displayed on the map. (INITAD is the
initialize address; RUNAD is the run
address.)
At the completion of successful
processing, PROBJ displays the
message:
File processed OK!
However, if an error occurred,
PROBJ will display (in addition to the
error message):
PROCESSING FAILED!
Note: Even though processing fails,
PROBJ may still have created an output
file, but the file will usually not be
valid!
Finally, PROBJ will ask:
Another file? (Y/N)
As before, press a key (not
<RETURN>). If you press anything other
than "Y", PROBJ will return to DOS.
Note